package com.yaowk.service.mall.clothing.entity;

import com.yaowk.service.file.entity.TSource;
import com.yaowk.service.system.entity.SysUser;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import java.util.Set;

/**
 * 商户
 */
@Getter
@Setter
@ToString
@Entity
@DynamicInsert
@DynamicUpdate
public class CmStore extends SysUser {

    @Column(unique = true, nullable = false)
    private String name; // 店铺名称
    @Column(unique = true, nullable = false)
    private String code; // 编号
    private String account; // 注册账号
    private String realName; // 姓名
    private String phoneNumber; // 电话号码
    private String headUrl; // 头像
    private String address; // 店铺地址
    private String latitude; // 纬度
    private String longitude; // 经度
    private String remark; // 备注
    @ManyToMany
    private Set<TSource> cmCertificates; // 证件
}
